package com.example.datamanage.pojo.dto;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author 28142
 * @description 注册DTO
 * @date 2023/7/21 9:14
 */
@Data
public class RegisterDTO {
    @NotBlank(message = "用户名不能为空")
    private String username;
    @Pattern(regexp = "^1[0-9]{10}$", message = "手机号不合法")
    private String phone;
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱不合法")
    private String email;
    @NotBlank(message = "密码不能为空")
    private String password;
    @NotBlank(message = "确认密码不能为空")
    private String confirmPwd;
    @NotBlank(message = "验证码不能为空")
    private String code;
}
